package org.linlinjava.litemall.db.dao.order_manage;

import org.apache.ibatis.annotations.Param;
import org.linlinjava.litemall.db.domain.AgedmallLeaseGoodsReturnRecord;
import org.linlinjava.litemall.db.vo.order_manage.*;

import java.time.LocalDateTime;
import java.util.List;

public interface BackendOrderMapper {

    List<OrderListVo> list(@Param("phone") String phone,@Param("orderSn") String orderSn, @Param("states") List<Short> states, @Param("provinceId") Integer provinceId,
                           @Param("cityId") Integer cityId, @Param("storeId") Integer storeId,@Param("shopId") Integer shopId,
                           @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

    List<OrderListGoodsVo> orderGoodsList(@Param("orderId") Integer orderId);

    int getCountByDeliverySn(@Param("orderId") Integer orderId, @Param("deliverySn") String deliverySn);

    List<OrderDetailSubOrderListGoodsVo> getOrderDetailSubOrderListGoodsVos(@Param("orderId") Integer orderId);

    List<OrderDetailSubOrderListGoodsVo> getOrderDetailSubOrderListGoodsVosNoSelf(@Param("orderId") Integer orderId);

    List<OrderDetailGoodsVo> getOrderDetailPackageGoodsVos(@Param("list") List<Integer> list);

    List<OrderDetailGoodsVo> getOrderDetailReturnGoodsVos(@Param("returnId") Integer returnId);

    List<OrderDetailSelfPickupVo> getOrderDetailSelfPickupVos(@Param("orderId") Integer orderId);

    void setOrderGoodsPackageId(@Param("orderGoodsIds") List<Integer> orderGoodsIds, @Param("packageId") Integer packageId);

    void removeOrderGoodsPackageId(@Param("packageId") Integer packageId);

    List<OrderDeliveryGoodsVo> getOrderDeliveryGoodsVos(@Param("orderId") Integer orderId, @Param("packageId") Integer packageId);

    List<OrderDeliveryGoodsVo> getOrderDeliveryGoodsVosNotDeliverLoad(@Param("orderId") Integer orderId, @Param("packageId") Integer packageId);

    List<OrderDeliveryGoodsVo> getSelfPickupGoodsVos(@Param("orderId") Integer orderId);

    int getUnConfirmCount(@Param("orderId") Integer orderId);

    List<OrderDeliveryGoodsVo> getAfterSaleGoodsVos(@Param("orderId") Integer orderId);

    List<OrderDeliveryGoodsVo> getUsingGoodsVos(@Param("orderId") Integer orderId);

    List<OrderDeliveryGoodsVo> getPickupGoodsVos(@Param("orderId") Integer orderId);

    AgedmallLeaseGoodsReturnRecord pickUpLeaseReturnRecord(@Param("orderId") Integer orderId, @Param("subOrderId") Integer subOrderId);

    List<String> getPackageDeliverySn(@Param("packageId")Integer packageId);
}